package com.tianji.learning.controller;


import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.dto.ReplyDTO;
import com.tianji.learning.query.QuestionAdminPageQuery;
import com.tianji.learning.query.ReplyPageQuery;
import com.tianji.learning.service.IInteractionReplyService;
import com.tianji.learning.vo.QuestionAdminVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 互动问题的回答或评论--用户端
 * </p>
 *
 * @author author
 * @since 2023-05-29
 */
@RestController
@Api("互动问题的回答或评论")
@RequestMapping("/replies")
public class InteractionReplyController {

    @Autowired
    private IInteractionReplyService replyService;

    @ApiOperation("新增回答或评论")
    @PostMapping
    public void savaReplies(@RequestBody ReplyDTO dto){
        replyService.savaReplies(dto);
    }

    @ApiOperation("分页查询互动问题的回答或评论")
    @GetMapping("page")
    public PageDTO<ReplyDTO> queryQuestionPage(ReplyPageQuery query){
        return replyService.queryQuestionPage(query);
    }

}
